// Author: Domien Nowicki

#ifndef MAPPOINTITEM_H
#define MAPPOINTITEM_H

#include <QGraphicsItem>
#include "Point.h"

class MapWidget;

class MapPointItem : public QObject, public QGraphicsItem, public Point
{
	Q_OBJECT
public:
	// Constructors
	MapPointItem(MapWidget *mapWidget, int x, int y);
	MapPointItem(const MapPointItem& rhs);
	MapPointItem(MapWidget *mapView, const Point& rhs);

	// Destructors
	virtual ~MapPointItem();

	// Qt overloaded functions
	QRectF boundingRect() const;
	QPainterPath shape() const;
	void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

public slots:
	// Add item to the graphics scene
	void AddToScene(QGraphicsScene *scene, QGraphicsItem *item=0);

private:
	MapWidget *map;

	static const int NODEWIDTH = 4;
	static const int NODEHEIGHT = 4;
	static const int NODERADIUS = 2;
	static const int NODEPENWIDTH = 0;
	static const unsigned int POINTZ = 3;
	static const unsigned int POINTADJUST = 2;
};

#endif /*MAPPOINTITEM_H*/
